package com.yz.app.sale.view.adapter;

import android.content.Context;

import com.yz.app.sale.R;
import com.yz.app.sale.base.adapter.BaseRcAdapterHelper;
import com.yz.app.sale.base.adapter.BaseRcQuickAdapter;
import com.yz.app.sale.entity.ArticleEntity;
import com.yz.app.sale.widget.DDFitTextView;

/**
 * ----------BigGod be here!----------/
 * ***┏┓******┏┓*********
 * *┏━┛┻━━━━━━┛┻━━┓*******
 * *┃             ┃*******
 * *┃     ━━━     ┃*******
 * *┃             ┃*******
 * *┃  ━┳┛   ┗┳━  ┃*******
 * *┃             ┃*******
 * *┃     ━┻━     ┃*******
 * *┃             ┃*******
 * *┗━━━┓     ┏━━━┛*******
 * *****┃     ┃神兽保佑*****
 * *****┃     ┃代码无BUG！***
 * *****┃     ┗━━━━━━━━┓*****
 * *****┃              ┣┓****
 * *****┃              ┏┛****
 * *****┗━┓┓┏━━━━┳┓┏━━━┛*****
 * *******┃┫┫****┃┫┫********
 * *******┗┻┛****┗┻┛*********
 * ━━━━━━神兽出没━━━━━━
 *
 * 项目名称：Sale
 * 类描述：
 * 创建人：zhangwei
 * 创建时间：2016-07-03 11:04
 * 修改人：zhangwei
 * 修改时间：2016-07-03 11:04
 * 修改备注：
 */

public class ArticleAdapter extends BaseRcQuickAdapter<ArticleEntity, BaseRcAdapterHelper> {


    public ArticleAdapter(Context context, int layoutResId) {
        super(context, layoutResId);
    }

    @Override
    protected void convert(BaseRcAdapterHelper helper, ArticleEntity item) {
        helper.getImageView(R.id.adapter_article_img);
        helper.setText(R.id.adapter_article_title_tv, item.getArticleTitle());
        helper.setText(R.id.adapter_article_price_tv, item.getArticlePrice());
        DDFitTextView ddftv = helper.getView(R.id.adapter_article_ddftv);
        ddftv.setIconAndText(new int[]{R.mipmap.icon_ping_m, R.mipmap.icon_zhi_m}, "1", "2");
    }
}
